<template>
  <div class="wrap">
    <m-header v-bind:title="title" v-bind:subtitle="subtitle">
      <button class="btn" slot="left" v-on:click="goback">
        <span class="fa fa-angle-left"></span>
      </button>
      <button class="btn" slot="right">
        <span class="fa fa-share"></span>
      </button>
      <button class="btn" slot="right">
        <span class="fa fa-share"></span>
      </button>
    </m-header>
  
    <div class="question">
      <div class="abouts flex-cnt-start">
        <div class="about-item" v-for="item in about_list">{{item.name}}</div>
      </div>
      <h1>{{title}}</h1>
      <p class="question-mirror" v-if="ques_mirror != ''">镜像问题：
        <a href="#">{{ques_mirror}}</a>
      </p>
      <div class="question-handle flex-cnt-btwn">
        <div class="fill">
          <button class="btn">
            <span class="fa fa-eye"> 14445</span>
          </button>
          <button class="btn">
            <span class="fa fa-comment"> 11</span>
          </button>
        </div>
        <button class="btn btn-watch">关注</button>
      </div>
    </div>

    <div class="group-btn flex-cnt-btwn">
      <div class="fill btn-group-item flex-cnt-cnt">
        <span class="fa fa-user-plus"></span>
        <span>邀请回答</span>
      </div>
      <div class="fill btn-group-item flex-cnt-cnt">
        <span class="fa fa-edit" style="margin-top: 1px;"></span>
        <span>写回答</span>
      </div>
    </div>
    
  </div>
</template>

<script>
  import Header from '../components/header'

  export default {
    name: 'view-question',
    data () {
      return {
        title: '哪些你曾经认为愚蠢至极的观点，最后发现居然有一定的道理？',
        subtitle: '991 个回答',
        about_list: [
          {id: 1, name: '法律'},
          {id: 2, name: '健康'},
          {id: 3, name: '生活'},
          {id: 4, name: '设计'}
        ],
        ques_mirror: '哪些你曾经认为无比正确的事，后来发现真的错了？ - 知乎'
      }
    },
    components: {
      'm-header': Header
    },
    methods: {
      goback () {
        this.$router.go(-1)
      }
    }
  }
</script>

<style lang="less" scoped>
  .question, .group-btn {
    background-color: #fff;
  }

  .question {
    padding: 50px 10px 15px;
  }

  .abouts {
    padding: 15px 0;

    .about-item {
      border-radius: 15px;
      color: #288CE5;
      background-color: #EFF6FA;
      padding: 10px 15px;
      margin-right: 10px;
    }
  }

  h1 {
    color: #333;
    font-size: 20px;
    line-height: 1.4;
    margin-bottom: 20px;
  }

  .question-mirror {
    line-height: 1.4;
    margin-bottom: 15px;
    a {
      color: #288CE5;
    }
  }

  .question-handle {
    color: #999;

    .btn {
      margin-right: 10px;
    }
  }

  .btn-watch {
    color: #fff;
    background-color: #288CE5;
    border-radius: 5px;
    padding: 10px 30px;
  }

  .group-btn {
    margin-bottom: 10px;
    .fa {
      margin-right: 5px;
    }
  }

  .btn-group-item {
    border: 1px solid #F2F2F2;
    font-size: 16px;
    color: #999;
    min-height: 50px;

    &:last-child {
      border-left: 0px;
    }
  }
</style>
